/**
 * Created by hejg on 2018/5/7.
 */
import React, {Component} from 'react';
import {
    ScrollView,
    View,
    StyleSheet,
    Text,
    TouchableOpacity,
} from 'react-native';
import FontAwesome from 'react-native-vector-icons/FontAwesome';
import Style from '../../../../components/Style';
import Tool from '../../../../components/Tool';
import Echarts from 'native-echarts';
export default class Examination extends Component {
    constructor(props) {
        super(props);
    }
    render() {
        return (
            <View>
                <View style={{backgroundColor:Style.color.white,marginBottom:10}}>
                    <Text style={{color:Style.color.blue, position:'absolute',left:'5%',top:'5%'}}>7Th</Text>
                    <View style={{flexDirection:'column', position:'absolute',left:'80%',top:'5%'}}>
                        <Text>综合得分</Text>
                        <Text style={{color:Style.color.lightRed}}>78</Text>
                    </View>
                    <Echarts option={this.props.option} height={300} width={Style.css.width}/>
                </View>
                <View>
                    <View style={{flexDirection:'row',height:Style.css.listHeight,}}>
                        <Listitem index={1}/>
                        <Listitem/>
                    </View>
                </View>
            </View>
        );
    }
}
class TabItem extends Component{
    render(){
        return(
            <TouchableOpacity style={{height:Style.css.titleHeight,justifyContent:'center',borderBottomWidth:1,borderColor:this.props.select?Style.color.blue:'transparent'}}>
                <Text style={{fontSize:Style.fontSize.normal,color:this.props.select?Style.color.blue:Style.color.gray}}>
                    {this.props.title}
                </Text>
            </TouchableOpacity>
        )
    }
}
class Listitem extends Component{
    render(){
        return(
            <View style={{flexDirection:'row',flex:1,backgroundColor:Style.color.white,margin:5,paddingLeft:10,
                paddingRight:10,justifyContent:'space-between'}}>
                <View style={{flexDirection:'column',width:'75%'}}>
                    <Text>整体收入情况</Text>
                    <Text style={{color:Style.color.black}}>21名</Text>
                </View>
                <View style={{flexDirection:'column',width:'25%',alignItems:'flex-end'}}>
                    <Text>得分</Text>
                    <Text  style={{color:Style.color.black}}>10.0</Text>
                </View>
            </View>
        )
    }
}
const styles = StyleSheet.create({
    container: {
        flex: 1, backgroundColor: Style.color.screen
    },
    listView: {
        height: Style.css.titleHeight, flexDirection: 'row', marginTop: 10,
    },
    titleView: {
        paddingLeft: 20,
        alignItems: 'center',
        flex: 1,
        height: Style.css.titleHeight,
        flexDirection: 'row',
        backgroundColor: Style.color.white,
        borderBottomWidth:2,
        borderColor:Style.color.gray,
        justifyContent: 'space-around',
    },

})